﻿@* Generator: Template *@
@functions { public dynamic Model { get; set; } }@{
    var dotModule = Model.Module == null ? "" : ("." + Model.Module);
    var moduleDot = Model.Module == null ? "" : (Model.Module + ".");
    var moduleSlash = Model.Module == null ? "" : (Model.Module + "/");
    var secondComma = Model.Identity != null ? ", " : "";
}
namespace @(Model.RootNamespace)@(dotModule)
{
    using jQueryApi;
    using Serenity;
    using System.Collections.Generic;

    [@if (Model.Identity != null){<text>IdProperty(@(Model.RowClassName).IdProperty)</text>}@if (Model.NameField != null){<text>@(secondComma)NameProperty(@(Model.RowClassName).NameProperty)</text>}]
    [FormKey("@(moduleDot)@(Model.ClassName)"), LocalTextPrefix(@(Model.RowClassName).LocalTextPrefix), Service(@(Model.ClassName)Service.BaseUrl)]
    public class @(Model.ClassName)Dialog : EntityDialog<@(Model.RowClassName)>
    {
        protected @(Model.ClassName)Form form;

        public @(Model.ClassName)Dialog()
        {
            form = new @(Model.ClassName)Form(this.IdPrefix);
        }
    }
}